-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add TableFor and ColumnFor extensions with NameCompatibilityManager support #7968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
src/Libraries/Nop.Data/Migrations/UpgradeTo490/SchemaMigration.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Nop.Data/Migrations/UpgradeTo490/SchemaMigration.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Nop.Data/Migrations/UpgradeTo490/SchemaMigration.cs
Outdated
Show resolved
Hide resolved
|
@skoshelev Thanks for your feedback, I'll mention you once all comments resolved. |
|
Hi @atiq-bs23! Thank you very much for your help. I looked at the code and left a couple of suggestions. Please make the necessary changes. Also, modify older migrations so that the code seems consistent across the entire codebase. |
|
@skoshelev I resolved all comments, please merge this one so that I can create a new PR for updating all existing migrations |
|
There are a lot of changes in existing migrations and also I found some code where NameCompatibility is not considered. So I think it would be good to have it in a separate PR. |
This PR adds
TableFor,ColumnForandFromTableextension methods forIDeleteExpressionRoot,IAlterExpressionRoot, andISchemaExpressionRootto ensure table and column names are resolved viaNameCompatibilityManager.Supports schema checks, altering, adding, and deleting columns in a type-safe manner.
Includes strongly-typed column selector overloads for safer refactoring.
Updated XML summaries for all new methods for consistency with existing extension methods.
Note: Changes in
SchemaMigrationare only for reference purposes.These changes will not affect any existing migrations since the
NopSchemaMigrationattribute date has not been modified, and the migration will not execute.Now we can write like below